import openpyxl

myBook=openpyxl.load_workbook('收入表.xlsx')
mySheet=myBook.worksheets[0]
myRange=mySheet['A1':'D8']
myValues=[sum([myCell.value for myCell in myRow[1:]]) for myRow in myRange[4:]]
print(myValues)
myRowIndex=5
for myValue in myValues:
	mySheet.cell(myRowIndex,5).value=myValue
	myRowIndex+=1

myBook.save('收入表.xlsx')
